import { request } from '@/api/core/request'
// import { projectConfig } from '@/config'

export class RepositoryService {
  static getRepositoryFile(
    projectId: number,
    file_path: string,
    branch: string,
  ) {
    return request({
      // baseURL: projectConfig.get('gitlab_base_url'),
      baseURL: 'http://gitlab.internal.daspatial.com/api/v4',
      method: 'GET',
      url: '/projects/{projectId}/repository/files/{file_path}/raw',
      path: {
        projectId,
        file_path,
      },
      params: {
        ref: branch,
      },
    })
  }
}
